home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / arpa / i386 / nameser.h
Text File  |  1992-04-23  |  2KB  |  45 lines

  1. /* Copyright (c) 1992 NeXT Computer, Inc.  All rights reserved.
  2.  *
  3.  *    File:    bsd/arpa/i386/nameser.h
  4.  *
  5.  *    i386 dependant name server data structures.
  6.  */
  7.  
  8. /*
  9.  * Copyright (c) 1983 Regents of the University of California.
  10.  * All rights reserved.  The Berkeley software License Agreement
  11.  * specifies the terms and conditions for redistribution.
  12.  *
  13.  *    @(#)nameser.h    5.17 (Berkeley) 11/17/87
  14.  */
  15.  
  16.  
  17. /*
  18.  * Structure for query header, the order of the fields is machine and
  19.  * compiler dependent, in our case, the bits within a byte are assignd 
  20.  * least significant first, while the order of transmition is most 
  21.  * significant first.  This requires a somewhat confusing rearrangement.
  22.  */
  23.  
  24. typedef struct {
  25.     u_short    id;        /* query identification number */
  26.         /* Bit zero on right:  VAX */
  27.                         /* fields in third byte */
  28.         u_char  rd:1;           /* recursion desired */
  29.         u_char  tc:1;           /* truncated message */
  30.         u_char  aa:1;           /* authoritive answer */
  31.         u_char  opcode:4;       /* purpose of message */
  32.         u_char  qr:1;           /* response flag */
  33.                         /* fields in fourth byte */
  34.         u_char  rcode:4;        /* response code */
  35.         u_char  unused:2;       /* unused bits */
  36.         u_char  pr:1;           /* primary server required (non standard) */
  37.         u_char  ra:1;           /* recursion available */
  38.             /* remaining bytes */
  39.     u_short    qdcount;    /* number of question entries */
  40.     u_short    ancount;    /* number of answer entries */
  41.     u_short    nscount;    /* number of authority entries */
  42.     u_short    arcount;    /* number of resource entries */
  43. } HEADER;
  44.  
  45.